package org.microservice.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/6/6
 * Time: 14:15
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@SpringBootApplication
@EnableEurekaClient
@ComponentScan(basePackages = {"org.microservice.common","org.microservice.auth","org.microservice.redis"})
@RestController
public class AuthServerApplication {

    @GetMapping("/user")
    public Principal user(Principal user){
        return user;
    }


    public static void main(String[] args) {
        SpringApplication.run(AuthServerApplication.class,args);
    }
}
